<template>
  <div>
    <!-- 劳动合同 -->
    <labor :data="form" />

    <!-- 打印按钮 -->
    <el-button-group class="printerBtn">
      <el-button type="primary" icon="el-icon-printer" @click="printerBtn">打印</el-button>
      <el-button type="primary" icon="el-icon-finished" @click="sendEleSign">发送电签</el-button>
    </el-button-group>
  </div>
</template>

<script>
import indexMixin from './mixins/index';
import Labor from '@/components/Standard/Labor';

export default {
  name: 'home',
  components: {Labor},
  mixins: [indexMixin],
  data() {
    return {
      form: {},
      type: 'standard'
    };
  },
  mounted() {
    let data = this.$route.params.data || {};
    data = {...data};
    for (const key in data) {
      data[key] = data[key] || '/';
    }
    this.form = data;
  },
  methods: {}
};
</script>

<style lang="scss" scoped>
.a4 {
  margin: 20px auto;
}
.printerBtn {
  position: fixed;
  top: 20px;
  right: 20px;
}
</style>
